/*=========================================================================
*  Copyright 2009 NCS Pte. Ltd. All Rights Reserved
*
*  This software is confidential and proprietary to NCS Pte. Ltd. You shall
*  use this software only in accordance with the terms of the license
*  agreement you entered into with NCS.  No aspect or part or all of this
*  software may be reproduced, modified or disclosed without full and
*  direct written authorisation from NCS.
*
*  NCS SUPPLIES THIS SOFTWARE ON AN AS IS BASIS. NCS MAKES NO
*  REPRESENTATIONS OR WARRANTIES, EITHER EXPRESSLY OR IMPLIEDLY, ABOUT THE
*  SUITABILITY OR NON-INFRINGEMENT OF THE SOFTWARE. NCS SHALL NOT BE LIABLE
*  FOR ANY LOSSES OR DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
*  MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
*
*  Change Revision
*  -------------------------------------------------------------------------
*  May 26, 2009  yunfeng   Description
*/
package canglang.monitor.core.base.taglib.date;

import org.apache.struts2.views.jsp.ui.TextFieldTag;
import org.apache.struts2.components.Component;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletRequest;

import com.opensymphony.xwork2.util.ValueStack;

public class DateTag extends TextFieldTag {
    /**
	 * 
	 */
	private static final long serialVersionUID = 3433053483740730918L;
	protected String doNotDisplayFormat;

    public String getDoNotDisplayFormat() {
        return doNotDisplayFormat;
    }

    public void setDoNotDisplayFormat(String doNotDisplayFormat) {
        this.doNotDisplayFormat = doNotDisplayFormat;
    }

    public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        return new DateField(stack, req, res);
    }

    protected void populateParams() {
        super.populateParams();
        DateField dateField = ((DateField) component);
        dateField.setTemplate("datecalendar.ftl");
        dateField.setDoNotDisplayFormat(doNotDisplayFormat);
    }
}




